<template>
	<view class="module-block" v-if="orderInfo.tourer_list && orderInfo.tourer_list.length">
		<view class="module-info">
			<view class="module-title">旅客信息<view class="checkDetail" @click="toTourerList">详情<text class="iconfont">&#xe67f;</text></view></view>
			<view class="module-group">
				<view class="group-item" v-for="(item,index) in orderInfo.tourer_list" :key="index" v-if="index < 2">
					<view class="item-tit">游客{{index+1}}</view>
					<view class="item-col">
						<view class="label">姓名</view>
						<view class="info">
							<block v-if="item.en_first_name && item.en_last_name">{{item.en_first_name}}/{{item.en_last_name}}</block>
							<block v-else>{{item.tourername}}</block>
						</view>
					</view>
					<view class="item-col">
						<view class="label">{{item.cardtype}}</view>
						<view class="info">{{item.cardnumber}}</view>
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>
<script>
	/**
	 * 订单详情旅客信息
	 * 
	 */
	export default {
		name: 'stOrderDetailTraveller',
		props: {
			orderInfo:{
				type: Object,
				default() {
					return {}
				}
			}
		},
		data() {
			return {}
		},
		methods:{
			// 前往游客列表
			toTourerList(){
				this.$emit('tourerlist');
			}
		}
	}
</script>

<style lang="scss">
	.module-block{
		padding: 0 24rpx;
		margin-bottom: 20rpx;
	}
	.module-info{
		padding: 28rpx 24rpx 0;
		border-radius: 20rpx;
		background-color: $uni-bg-color;
		.module-title{
			@extend .justifyspacec;
			line-height: 1.24;
			font-size: 34rpx;
			font-weight: bold;
			.checkDetail{
				@extend .alignItems;
				font-size: $uni-font-size-sm;
				color: $uni-text-color-grey;
				font-weight: normal;
				line-height: initial;
			}
		}
		.module-group{
			padding: 20rpx 0;
			.group-item{
				padding: 20rpx 0;
				font-size: $uni-font-size-base;
				.item-tit{
					font-weight: bold;
					line-height: 1.429;
					margin-bottom: 12rpx;
				}
				.item-col{
					@extend .alignItems;
					height: 60rpx;
					font-family: Arial, Helvetica, sans-serif;
					.label{
						width: 150rpx;
						color: $uni-text-color-grey;
					}
				}
			}
		}
	}
</style>
